package com.gxa.customer.controller;

import com.gxa.common.commons.R;
import com.gxa.common.params.AddHousePurchaseParam;
import com.gxa.common.params.QueryHousePurchaseParam;
import com.gxa.customer.service.HousePurchaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/customer/housePurchase")
public class HousePurchaseController {
    @Autowired
    HousePurchaseService housePurchaseService;

    /**
     * 新增置业信息
     * @param param
     * @return
     */
    @PostMapping("/addHousePurchase")
    public R addHousePurchase(@RequestBody AddHousePurchaseParam param){
        return housePurchaseService.addHousePurchase(param);
    }

    /**
     * 查询置业详情(前端根据置业信息id不同将置业信息合同分类)
     * @param param
     * @return
     */
    @PostMapping("/queryHousePurchase")
    public R queryHousePurchase(@RequestBody QueryHousePurchaseParam param){
        return housePurchaseService.queryHousePurchase(param);
    }
}
